package com.zhoukun.cloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author zhoukun 86547462@qq.com
 * @version 1.0
 * @date 2020/10/24 21:05
 */
@Configuration
public class ApplicationConfig {
    //LoadBalanced配置负载均衡
    @Bean
    @LoadBalanced
    public RestTemplate getrestTemplate(){
        return new RestTemplate();
    }
}
